<?php
/*
Cogumelo v0.1 - Map-Experience
Copyright (C) 2008 Innoto Gestión para el Desarrollo Social S.L. <mapinfo@map-experience.com>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
USA.
*/

include("Classes/Utils/FileLift/FileLiftPreProcessor.inc");
require_once("Conf/setup.inc");
			
//filelift data array structure
$flData = array('id' => false, 'go' => false, 'obj' => false, 'cat' => false, 'name' => false, 'file' => false);

//get variables
$prof = (!$postData['prof']) ? $getData['prof'] : $postData['prof'];
$flData['id'] = (!$postData['id']) ? $getData['id'] : $postData['id'];
$flData['go'] = (!$postData['go']) ? $getData['go'] : $postData['go'];
$flData['cat'] = (!$postData['cat']) ? $getData['cat'] : $postData['cat'];
$flData['file'] = (!$postData['file']) ? $getData['file'] : $postData['file'];
$flData['obj'] = $postData['obj'];
$flData['name'] = $postData['name'];

if(!$flData['file'])
	unset($flData['file']);
if(!$flData['id'])
	unset($flData['id']);

switch($flData['go'] == 'blank')
{
	case 'blank':
		die('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
		<html>
			<head>
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
				<style>
					body {
						margin: 0;
					}
				</style>
				<base href="' . site_url . '/"/>
			</head>
			<body>
				<script type="text/javascript" src="Templates/Script/lib/jQuery/jQuery.js"></script>
				<script>
					/*jQuery(document).ready(function () {
						
					});*/
				</script>
			</body>
		</html>');
	default:
		switch($prof)
		{
			default: new FileLiftPreProcessor($prof, $flData);
		}
}
?>